package string;

public class Demo11 {
    public static void main(String[] args) {
        String str ="Thinking in Java 是本好书";
        int index = str.indexOf("java");//12
        //index  = str.indexOf("in");//2
       // index = str.indexOf('i');//2
       // index=str.indexOf("java");//-1
        System.out.println(index);
    }
}
